﻿namespace fpsrpg
{
    using System;
    using System.Collections.Generic;
    using System.Text;

    using fpsrpg.ScriptedWeapons;

    using Microsoft.Xna.Framework;
    using Microsoft.Xna.Framework.Content;
    using Microsoft.Xna.Framework.Graphics;
    using Microsoft.Xna.Framework.Input;
    using Microsoft.Xna.Framework.Storage;

    class Weapons
    {
        #region Fields

        Weapon[] available = { new Weapon_Hands(), new Weapon_m249(), new Weapon_m200_intervention(), new Weapon_ak47() };
        uint current;

        #endregion Fields

        #region Methods

        public Weapon GetWeapon()
        {
            return available[current];
        }

        public void Next()
        {
            if (current + 1 == available.GetLength(0))
                return;

            current++;
        }

        public void Previous()
        {
            if (current == 0)
                return;

            current--;
        }

        public void Switch(uint weaponId)
        {
            if (weaponId >= available.GetLength(0))
                return;

            current = weaponId;
        }

        #endregion Methods

        #region Other

        ////public Texture2D WeaponSwitch(ContentManager TheContentManager, uint TheWeaponInt)
        //{
        //    muzzleflash = TheContentManager.Load<Texture2D>("crappymuzzle");
        //    switch (TheWeaponInt)
        //    {
        //        case 1:
        //            ShootDelay = 0.08f;
        //            damage = 5;
        //            WeaponSound = "m249-1";
        //            WeaponBullet = "crappybulleteffect";
        //            Weapon_bulletimpactsound = null;
        //            WeaponHudTexture = TheContentManager.Load<Texture2D>("weapon_m249_hud");
        //            return WeaponTexture = TheContentManager.Load<Texture2D>("weapon_m249");
        //        case 2:
        //            ShootDelay = 0.15f;
        //            damage = 10;
        //            WeaponSound = "ak47-1";
        //            WeaponBullet = "crappybulleteffect";
        //            Weapon_bulletimpactsound = null;
        //            WeaponHudTexture = TheContentManager.Load<Texture2D>("weapon_ak47_hud");
        //            return WeaponTexture = TheContentManager.Load<Texture2D>("weapon_ak47_brown");
        //        case 3:
        //            ShootDelay = 2.0f;
        //            damage = 80;
        //            WeaponSound = "rocket-1";
        //            WeaponBullet = "bullet_rocket";
        //            Weapon_bulletimpactsound = "explode-4";
        //            WeaponHudTexture = TheContentManager.Load<Texture2D>("weapon_rocketlauncher_hud");
        //            return WeaponTexture = TheContentManager.Load<Texture2D>("weapon_rocketlauncher");
        //        case 4:
        //            ShootDelay = 1.5f;
        //            damage = 70;
        //            WeaponSound = "m200-1";
        //            WeaponBullet = "crappybulleteffect";
        //            Weapon_bulletimpactsound = null;
        //            WeaponHudTexture = TheContentManager.Load<Texture2D>("weapon_m200_intervention_hud");
        //            return WeaponTexture = TheContentManager.Load<Texture2D>("weapon_m200_intervention");
        //        default:
        //            ShootDelay = 1.0f;
        //            damage = 0;
        //            WeaponSound = "MP5-1";
        //            WeaponBullet = "crappybulleteffect";
        //            Weapon_bulletimpactsound = null;
        //            return WeaponTexture = TheContentManager.Load<Texture2D>("weapon_default");
        //    }
        //}

        #endregion Other
    }
}